
#ifndef QTSERIALPORT_H
#define QTSERIALPORT_H
#ifdef __cplusplus
extern "C"
{
#endif
#include "serial.h"
#include "selct.h"
#ifdef __cplusplus
}
#endif
#include <QString>
#include <QThread>
class QtSerialPort:public QThread
{
     Q_OBJECT
private:
        int fd;
public:
    QtSerialPort(QObject *parent = 0);
    int open(char *dev);
    QString  receive();
    int send(char *buf,int len);
    void  run();
signals:
     void readyRecv();
};

#endif // QTSERIALPORT_H
